﻿@model SportStore.Models.Entities.Cart
@{ Layout = null; }
<script type="text/javascript">
    $(function () {
        $("a#ShoppingCart").click(function () {
            var loc = window.location.toString().split("#")[1];
            if (loc == null) loc = "";
            if (loc.indexOf("cart") < 0)
                navigateTo('/cart/index/', window.location);
            else
                $("#main").hide().fadeIn();
        });
    });
</script>
<div id="cartholder">
    <div id="cart">
        <img src="" id="cart_loading" style="display:none;float:left;margin:0 15px 0 0;" />
        <span class="caption"><b>Your cart:</b>
            @Model.Lines.Sum(x => x.Quantity) item(s),
            @Model.ComputeTotalValue().ToString("c")
        </span>
        <a href="#cart/index" id="ShoppingCart">Shopping cart</a>
    </div>
</div>
